package com.mes.cloud.mail;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.LinkedHashMap;
import java.util.Map;

@Data
@ConfigurationProperties("mes.cloud.mail")
public class MailProperties {

    private Map<String, Config> senders = new LinkedHashMap<>();

    @Data
    public static class Config {
        private String host;

        private int port ;

        /**
         * 发送人中文名称
         */
        private String from;

        private String domain;

        private String userName;

        private String password;
        /**
         * 邮件发送协议
         */
        private String protocol;
        /**
         * 默认编码
         */
        private String defaultEncoding;
    }
}
